<?php
include_once("include/include.php.inc");
html_header("Update Support");


/*   $backlink=getenv('HTTP_REFERER');*/

   if (isset($_POST['sup_uid'])) {
      $msup_no = $_POST['sup_uid'];
      $msup_name = $_POST['sup_name'];
      $msup_email = $_POST['sup_email'];
	  $msup_pass = $_POST['sup_pass'];
      $result = "UPDATE ssts_support SET ssts_support.sup_name='$msup_name',ssts_support.sup_email='$msup_email' WHERE ssts_support.sup_uid='$msup_no'";
      $action = mysql_query($result) or die("Error: ssts ".mysql_error());

	  $result1 = "UPDATE chd_users SET chd_users.username='$msup_name',chd_users.mail='$msup_email' ,
	  chd_users.password=MD5('$msup_pass') WHERE chd_users.uid='$msup_no'";
      $action1 = mysql_query($result1) or die("Error: chd ".mysql_error());
	  echo "<div class='box'>\n"; 
echo " <div class='boxtop'><div></div></div>\n"; 
echo "  <div class='boxcontent'>\n"; 

      print "<center><h2>User Updated</h2></center>";
	  
echo "  </div>\n"; 
echo " <div class='boxbottom'><div></div></div>\n"; 
echo "</div>\n"; 
echo "\n";
   }
   else
     print "<center>No User No. Passed!!! Error!!!!</center>";

   html_footer();
?>
